<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<nav class="navbar navbar-expand-lg main-navbar" th:fragment="navbar">
    <form class="form-inline mr-auto">
        <ul class="navbar-nav mr-3">
            <!--            <li><a href="#" data-toggle="sidebar" class="nav-link nav-link-lg"><i class="ion ion-navicon-round"></i></a></li>-->
        </ul>
    </form>
    <ul class="navbar-nav navbar-right">
        <li class="dropdown"><a href="#" data-toggle="dropdown" class="nav-link dropdown-toggle nav-link-lg">
            <i class="ion ion-android-person d-lg-none"></i>
            <div class="d-sm-none d-lg-inline-block">
                <i class="ion ion-android-person" style="font-size: 14px"></i> [[${session.loginUser.name}]]【[[${session.loginUser.email}]]】
            </div>
        </a>
            <div class="dropdown-menu dropdown-menu-right">
                <a href="index.html"  class="dropdown-item has-icon" target="_blank">
                    <i class="ion ion-coffee"></i> 商城主页
                </a>
                <a href="password.html"  class="dropdown-item has-icon">
                    <i class="ion ion-locked"></i> 修改密码
                </a>
                <a href="logout" class="dropdown-item has-icon">
                    <i class="ion ion-log-out"></i> 退出登录
                </a>
            </div>
        </li>
    </ul>
</nav>

<div class="main-sidebar" th:fragment="sidebar">
    <aside id="sidebar-wrapper">
        <div class="sidebar-brand">
            <a>咖咖小铺后台系统</a>
        </div>
        <div class="sidebar-user">
            <div class="sidebar-user-picture">
                <img alt="image" th:src="${session.loginUser.img}">
            </div>
            <div class="sidebar-user-details">
                <div class="user-name" th:text="${session.loginUser.name}"></div>
                <div class="user-role">
                    <span>商城管理员</span>
                </div>
            </div>
        </div>
        <ul class="sidebar-menu">
            <li class="menu-header">
                用户管理
            </li>
            <li th:class="${currUri == 'user-manage' ? 'active' : ''}">
                <a href="user-manage"><i class="ion ion-android-contacts"></i><span>用户管理</span></a>
            </li>

            <li class="menu-header">
                商品管理
            </li>
            <li th:class="${currUri == 'classify-manage' ? 'active' : ''}">
                <a href="classify-manage"><i class="ion ion-ios-color-filter"></i><span>商品分类</span></a>
            </li>
            <li th:class="${currUri == 'goods' ? 'active' : ''}">
                <a href="goods"><i class="ion ion-ios-list"></i><span>商品列表</span></a>
            </li>
            <li th:class="${currUri == 'new-goods' ? 'active' : ''}">
                <a href="new-goods"><i class="ion ion-coffee"></i><span>发布商品</span></a>
            </li>

            <li class="menu-header">
                订单管理
            </li>
            <li th:class="${currUri == 'wait-deliver' ? 'active' : ''}">
                <a href="wait-deliver"><i class="ion ion-android-alarm-clock"></i><span>待发货</span> <div th:if="${session.waitDeliver > 0}" class="badge badge-success" th:text="${session.waitDeliver}"></div></a>
            </li>
            <li th:class="${currUri == 'wait-take' ? 'active' : ''}">
                <a href="wait-take"><i class="ion ion-archive"></i><span>待收货</span></a>
            </li>
            <li th:class="${currUri == 'finished-order' ? 'active' : ''}">
                <a href="finished-order"><i class="ion ion-android-happy"></i><span>已完成</span></a>
            </li>
            <li th:class="${currUri == 'cancel-order' ? 'active' : ''}">
                <a href="cancel-order"><i class="ion ion-android-sad"></i><span>已取消</span><div th:if="${session.cancelOrder > 0}" class="badge badge-danger" th:text="${session.cancelOrder}"></div></a>
            </li>

            <li class="menu-header">
                评论管理
            </li>
            <li th:class="${currUri == 'comment-manage' ? 'active' : ''}">
                <a href="comment-manage"><i class="ion ion-chatbox-working"></i><span>商品评论</span></a>
            </li>
    </aside>
</div>

<footer class="main-footer" th:fragment="footer">
    <div class="footer-left">

    </div>
    <div class="footer-right"></div>
</footer>
</body>
</html>